import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
    state: {
        // 登录弹框
        lblock: "",
        // 注册弹框
        rblock: "",
        // 小学新生入学报名弹框
        pcblock: "",
        // 初中新生入学报名弹框
        jcblock: "none",
        // 外省回长报考区域
        ocblock: "none",
        // 初中特色学校报名对话框
        jsblock: "none"
    },
    mutations: {
        // 更新登录的弹框
        updateLD(state, val) {
            state.lblock = val
        },
        // 更新注册的弹框
        updateRD(state, val) {
            state.rblock = val;
        },
        // 更新小学新生入学报名弹框
        updatePC(state, pcblock) {
            state.pcblock = pcblock;
        },
        updateJC(state, jcblock) {
            state.jcblock = jcblock;
        },
        updateOC(state, ocblock) {
            state.ocblock = ocblock;
        },
        updateJS(state, jsblock) {
            state.jsblock = jsblock;
        }
    }
})
